Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

332
Views
How to convert "this" from declaration function to arrow function
const foo = x => {
var y = x * 2

return function bar(z) {
  if (z.length > 3) {
    return z.map(
      (baz = v => {
        if (v > 3) return v + y
        else return baz(v * 4)
      })
    )
  } else {
    var obj = []
    const bam = () => {
      obj.length = 1
      obj[0] = this.w
    }
    setTimeout(bam.bind(this), 100)

    return obj
  }
}

I wanna convert "bar" function to arrow function, so what should i do with the 2 "this" inside?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!